package com.guigui.gulimall.order.feign;

import com.guigui.common.to.ware.WareStockVo;
import com.guigui.gulimall.order.dto.OrderLockDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("gulimall-ware")
public interface WareFeignService {
    /**
     * 是否有库存
     * @param skuId
     * @return
     */
    @PostMapping("/ware/waresku/stock")
    List<WareStockVo> hasStock(@RequestBody List<Long> skuId);

    @PostMapping("/ware/waresku/lock")
    List<WareStockVo> lockProduct(@RequestBody OrderLockDto orderLock);
}
